package com.listview.ulti;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import Entities.EOut_side_total;
import android.util.Log;

public class MyStringPair {

    private String columnOne;
    private String columnTwo;
    private String column3;
    private String column4;
    private String column5;
    private String column6;
    public MyStringPair(String columnOne, String columnTwo,String column3, String column4,String column5,String column6) {
        super();
        this.columnOne = columnOne;
        this.columnTwo = columnTwo;
        this.column3 = column3;
        this.column4 = column4;
        this.column5 = column5;
        this.column6 = column6;
    }
    
   

	public String getColumnOne() {
        return columnOne;
    }
    public void setColumnOne(String columnOne) {
        this.columnOne = columnOne;
    }
    public String getColumnTwo() {
        return columnTwo;
    }
    
    public void setColumnTwo(String column3) {
        this.columnTwo = column3;
    }
    public String getColumn3() {
        return column3;
    }
    public void setColumn3(String column3) {
        this.column3 = column3;
    }
    
    public String getColumn4() {
        return column4;
    }
    public void setColumn4(String column4) {
        this.column3 = column4;
    }
    
    public String getColumn5() {
        return column5;
    }
    public void setColumn5(String column5) {
        this.column5 = column5;
    }
    
    public String getColumn6() {
        return column6;
    }
    public void setColumn6(String column6) {
        this.column6 = column6;
    }

    
    public static List<MyStringPair> makeData(List<EOut_side_total> list) {
    	//Date day=null;
    	//SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");

        List<MyStringPair> pair = new ArrayList<MyStringPair>();
        String time1="";
        String time2="";
     
        for (EOut_side_total e : list) {
        	try {
        			
        		time1=e.getTime_In().substring(11, 16);
        		time2=e.getTime_out().substring(11, 16);
        		
				//day = formatter.parse(e.getTime_In());
				//time1 = day.getHours()+":" +day.getMinutes();
				//day = formatter.parse(e.getTime_out());
				//time2 = day.getHours()+":" +day.getMinutes();
			} catch (Exception e1) {
				
				e1.printStackTrace();
			}
        	 
        	Log.d("looo", time1);
            pair.add(new MyStringPair(e.getvCardKey(), e.getvGateName(), time1,time2,e.getvFullname(),e.getvImg()));
        }
        return pair;
    }

}
